<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>上行短信</title>
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

    <!-- 可选的Bootstrap主题文件（一般不用引入） -->
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

    <!-- Custom styles for this template -->
    <style type="text/css">
        body {
            padding-top: 50px;
        }

    </style>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">移动短信</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li><a href="/">首页</a></li>
                <li><a href="/list_message">下发短信记录</a></li>
                <li class="active"><a href="/list_mo">上行短信记录</a></li>
            </ul>
        </div><!--/.nav-collapse -->
    </div>
</nav>
<div class="container">
    <h2>历史记录</h2>
    <p>当前第{{.page.CurrentPage}}页, 一共{{.page.TotalPage}}页<p>
    <table class="table">
        <thead>
        <tr>
            <th>发送号码</th>
            <th>接收号码</th>
            <th>内容</th>
            <th>时间</th>
            <th>消息ID</th>
        </tr>
        </thead>
        <tbody>

        {{range .data}}
        <tr>
            <td>{{.Src}}</td>
            <td>{{.Dest}}</td>
            <td>{{.Content}}</td>
            <td>{{.Created}}</td>
            <td>{{.MsgId}}</td>
        </tr>
        {{end}}

        </tbody>
    </table>
    <ul class="pager">
        {{if .page.IsFirst}}
        {{else}}
        <li class="previous"><a href="list_mo?page={{.page.LastPage}}">&larr; 上一页</a></li>
        {{end}}
        {{if .page.IsEnd}}
        {{else}}
        <li class="next"><a href="list_mo?page={{.page.NextPage}}">下一页 &rarr;</a></li>
        {{end}}
    </ul>
</div>
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>


<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>

</html>